#coding=utf-8
'''
Created on 2016年3月2日
'''
import zmq
__author__ = 'chenjian'

if __name__ == '__main__':
    context    = zmq.Context()
    subscriber = context.socket(zmq.SUB)
    subscriber.setsockopt(zmq.SUBSCRIBE, b"")
    subscriber.bind("tcp://*:5563")
    
    pub = context.socket(zmq.PUB)
    pub.bind("tcp://*:5564")
#     subscriber.setsockopt(zmq.SUBSCRIBE, b"B")
    
    zmq.proxy(subscriber, pub)